//
//  HomeListHeaderView.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/8.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "HomeListHeaderView.h"

@implementation HomeListHeaderView{
    GLGWLabel * titleLabel;
    GLGWButton * pushBut;
}

-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        //
        GLGWView * topView = [[GLGWView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, kHeightProportion_In_iPhoneTriploid(10)) inSuperView:self];
        topView.backgroundColor = [UIColor whiteColor];
        //
        GLGWView * bankgroundView = [[GLGWView alloc] initWithInSuperView:self.contentView];
        [bankgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.bottom.right.equalTo(self.contentView).offset(0);
            make.top.equalTo(topView.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(10));
        }];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        //
        titleLabel = [[GLGWLabel alloc] initWithFont:BOLDSYSTEMFONT(18) theColor:kColor_Rule_Black inSuperView:bankgroundView];
        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(bankgroundView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(bankgroundView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(20));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(25)));
        }];
        //
        pushBut = [[GLGWButton alloc] initWithTitle:@"查看更多 " titleLableFont:SYSTEMFONT(14) titleLableColor:[UIColor colorWithHexString:@"#999999"] inSuperView:bankgroundView];
        pushBut.image_Name = @"icon_gengduo";
        [pushBut setImagePositionWithType:SSImagePositionTypeRight spacing:0];
        [pushBut mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(bankgroundView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(25));
            make.right.equalTo(bankgroundView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
    }
    return self;
}

-(void)setTitStr:(NSString *)titStr{
    _titStr = titStr;
    titleLabel.text = _titStr;
}

@end
